<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title> 百钱买白鸡</title>
		<script type="text/javascript">
		var a, b, c;
		var count= 0;
		for(a = 0; a < 20; a++) {
	    for(b = 0; b < 33; b++) {
		if(a * 5 + b * 3 <= 100) {
		c = 3 * (100 - (a * 5 + b * 3));
		if((a + b + c) == 100) {
		count++;
		alert("公鸡是：" + a + "只,母鸡是：" + b +"只,小鸡是：" + c + "只");
	}
		}
		}
		}
		alert("一共有" + count + "方法");
		</script>
	</head>
	<body>
	</body>
</html>
